<template>
  <div class="goodsPanel">
    <div class="top">
      <span>{{ panelInfo.title }}</span>
      <el-tooltip :content="panelInfo.tips" placement="top" effect="light">
        <el-icon><info-filled /></el-icon>
      </el-tooltip>
    </div>
    <div class="middle">
      <FhCountup
        :number="panelInfo.number1"
        :options="
          panelInfo.amount === 'saleroom' ? { prefix: '￥' } : { prefix: '' }
        "
      ></FhCountup>
    </div>
    <div class="bottom">
      <span>{{ panelInfo.title }} {{ panelInfo.number2 }}</span>
    </div>
  </div>
</template>

<script setup lang="ts">
import { defineProps } from 'vue'
import FhCountup from '@/base-ui/countup'

defineProps<{
  panelInfo: any
}>()
</script>

<style scoped lang="less">
@h: 38px;
.goodsPanel {
  background-color: #fff;
  height: 130px;
  margin-bottom: 20px;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  .top {
    padding-top: 10px;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    height: @h;
    text-align: center;
    align-items: center;
    color: rgba(0, 0, 0, 0.45);
  }
  .middle {
    font-size: 26px;
    display: flex;
    flex: 1;
    border-bottom: 1px solid rgb(233, 233, 233);
  }
  .bottom {
    height: @h;
    display: flex;
    font-size: 14px;
    justify-content: left;
    align-items: center;
  }
}
</style>
